package com.neu.service;

import com.github.pagehelper.PageHelper;
import com.neu.dao.ShoppingCollectMapper;
import com.neu.domain.ShoppingCollect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * 用户管理
 * 杨帆
 */
@Service
public class ShoppingCollectService {
    @Autowired
    private ShoppingCollectMapper shoppingCollectMapper;
    public List<ShoppingCollect> querySelective(String pageSize,String pageNum,Integer userId,Integer valueId,String sort,String order){
        int size = Integer.parseInt(pageSize);
        int num = Integer.parseInt(pageNum);
        PageHelper.startPage(num,size);
        List<ShoppingCollect> collectList = shoppingCollectMapper.selectByExample(userId,valueId);
        if (collectList.size() != 0){
            return collectList;
        }
        return null;
    }
}
